<template>

  <div class="container">
    <LeftNavMenu/>
    <el-row>
      <el-col>
        <el-button style=" margin-top: 10px;margin-left: 1285px" class="el-icon-download" size="medium" type="warning">
          <a class="a" href="http://localhost:8086/u/v1/load/user" target="_top">导出</a>
        </el-button>
      </el-col>
      <el-col>
        <el-table
            :data="tableData"
            height="500"
            border
            style=" margin-left: 300px;margin-top: 20px;width: 70%">
          <el-table-column
              prop="ID"
              label="用户id"
              width="180"
              header-align="center"
              align="center">
          </el-table-column>
          <el-table-column
              prop="UserName"
              label="姓名"
              header-align="center"
              align="center">
          </el-table-column>
          <el-table-column
              prop="Mobile"
              label="手机号码"
              header-align="center"
              align="center">
          </el-table-column>
          <el-table-column
              prop="NickName"
              label="昵称"
              header-align="center"
              align="center">
          </el-table-column>
          <el-table-column
              prop="Email"
              label="邮箱"
              header-align="center"
              align="center">
          </el-table-column>
          <el-table-column
              prop="CreateAt"
              label="创建时间"
              header-align="center"
              align="center">
          </el-table-column>
        </el-table>
      </el-col>
    </el-row>
  </div>

</template>

<script>
import LeftNavMenu from '@/components/leftNavMenu'
import {alluser} from "@/api/User";

export default {
  name: "userExcel",
  components:{
    LeftNavMenu
  },
  mounted() {
    alluser().then(res => {
      this.tableData = res.data.data
      console.log(res.data.data)
    })
  },
  data() {
    return{
      tableData: []
    }
  }
}
</script>

<style scoped>
.container{
  margin-left: 10px;
}
.a {
  color: white;
  text-decoration: none;
}
</style>
